package org.com.f4.controller;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;



@Controller
@RequestMapping(value = "/ztree")
public class ZtreeAction {
	
	
	
	@RequestMapping(value = "/json1")
	@ResponseBody
	public List<Map<String,Object>> json1()
			throws UnsupportedEncodingException {
		List<Map<String,Object>> list=new ArrayList<Map<String,Object>>();
		Map<String,Object> map1=new HashMap<>();
		map1.put("id", 4);
		map1.put("pid", 0);
		map1.put("name","系统管理");
		map1.put("src", "/message/index.action");
		map1.put("open", false);
		map1.put("nocheck", true);
		
		Map<String,Object> map2=new HashMap<>();
		map2.put("id", 41);
		map2.put("pid", 4);
		map2.put("name","用户管理");
		map2.put("src", "/message/index.action");
		map2.put("open", false);
		map2.put("nocheck", true);
		
		Map<String,Object> map3=new HashMap<>();
		map3.put("id", 3434343);
		map3.put("pid", 4);
		map3.put("name","角色管理");
		map3.put("src", "/role/index.action");
		map3.put("open", false);
		map3.put("nocheck", true);
		
		
		list.add(map1);
		list.add(map2);
		list.add(map3);
		
		/*list.add(map3);
		list.add(map4);*/
		return list;
	}
	
	


	
	
	
	
	

	
	
	}